package com.qingkai.onlineshop.utils

import android.graphics.Bitmap
import android.os.Build

/**
 *作者：created by 89270 on 2025/6/12 15:33
 *描述：
 */
fun Bitmap.toNonHardwareBitmap(): Bitmap {
    return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && this.config == Bitmap.Config.HARDWARE) {
        this.copy(Bitmap.Config.ARGB_8888, true)
    } else {
        this
    }
}